<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>absolute</title>
    <style>
        *{
            margin: 0;
            height: 0;
        }
        .yeye{
            width: 500px;
            height: 500px;
            background-color: green;
            margin-left: 50px;
            margin-top: 50px;
            position: relative;
        }
        .father{
            width: 400px;
            height: 400px;
            background-color: blue;
            margin-left: 50px;
        }
        .one{
            width: 200px;
            height: 200px;
            background-color: orange;
            position: absolute;
            top: 50px;
            left: 30px;
        }
        .two{
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>
    <!-- 会脱标 -->
    <div class="yeye">
        <div class="father">
            <div class="one"></div>
            <div class="two"></div>
        </div>
    </div>
    
</body>
</html>